#include <ti/drivers/soc/soc.h>
	SOC_Cfg         socCfg;     //SOC配置结构体
    Task_Params     taskParams; //任务参数
    SOC_Handle      socHandle;

    ESM_init(0U);               //与安全等有关，可略过

    /* Initialize the SOC configuration: */
    /* 初始化SOC配置结构体 */
    memset ((void *)&socCfg, 0, sizeof(SOC_Cfg));
    memset((void *)&MMWave_Global_Params,0,sizeof(MMWave_Global));

    /* 配置SOC配置结构体 */
    /* Populate the SOC configuration: */
    socCfg.clockCfg = SOC_SysClock_INIT;
    socCfg.mpuCfg = SOC_MPUCfg_CONFIG;

    /* require to UNHALT the DSS if this core is available in selected device */
    socCfg.dssCfg = SOC_DSSCfg_UNHALT;

    /* Initialize the SOC Module: This is done as soon as the application is started
     * to ensure that the MPU is correctly configured. */

    /* SOC初始化，必须在系统运行后尽快调用该初始化函数 */
    socHandle = SOC_init (&socCfg, &errCode);

    if (socHandle == NULL)
    {
        System_printf ("Error: SOC Module Initialization failed [Error code %d]\n", errCode);
        return -1;
    }
/* Wait for BSS powerup */
    if (SOC_waitBSSPowerUp(socHandle, &errCode) < 0)
    {
        /* Debug Message: */
        System_printf ("Debug: SOC_waitBSSPowerUp failed with Error [%d]\n", errCode);
        return 0;
    }

    /* Check if the SOC is a secure device */
    if (SOC_isSecureDevice(socHandle, &errCode))
    {
        /* Disable firewall for JTAG and LOGGER (UART) which is needed by all unit tests */
        SOC_controlSecureFirewall(socHandle,
                                  (uint32_t)(SOC_SECURE_FIREWALL_JTAG | SOC_SECURE_FIREWALL_LOGGER),
                                  SOC_SECURE_FIREWALL_DISABLE,
                                  &errCode);
    }

MMWave_Global_Params.handle.socHandle = socHandle;

    /* Debug Message: */
    System_printf ("Debug: Launching the MMW HWA Demo\n");

    /* Initialize the Task Parameters. */
    /* 创建一个任务用于测试 */
    Task_Params_init(&taskParams);
    //taskParams.priority = 3;      //优先级3
    MMWave_Global_Params.task.init = Task_create(MMWave_InitTask, &taskParams, NULL);
    /* Start BIOS */
    BIOS_start();
    return 0;
MCPI_LOGBUF_INIT(9216);
MCPI_Initialize();
